<%@ page import="javax.xml.crypto.Data" %>
<%@ page import="java.util.Date" %>
<%@ page import="java.text.SimpleDateFormat" %><%--
  Created by IntelliJ IDEA.
  User: 黑白客
  Date: 2019/6/1
  Time: 15:20
  To change this template use File | Settings | File Templates.
--%>
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<html>
<head>
    <title>使用SimpleDateFormat格式化日期</title>
</head>
<body>
    <h2>显示当前时间与日期</h2>

    <%
        Date dNow = new Date();
        SimpleDateFormat ft = new SimpleDateFormat();
        out.print("<h2 align = \"center\">" +ft.format(dNow) + " </h2>");
    %>
</body>
</html>
